package com.ds.infra.mq.core.api;


import com.ds.infra.mq.core.api.exception.ConsumeException;

/**
 * 作用：消费者接口
 *
 * @author WeiShaoying
 */
public interface Consumer {
    byte[] poll(String topic) throws ConsumeException;

    byte[] poll(String topic, int partition) throws ConsumeException;

    void subscribe(String topic);

    void unsubscribe(String topic);

    void close();
}
